<?php
require_once('./connexion.php');
require ('../func.req.php');
require('../config/tbl.php');

//Include config and lang pack
include("./config.php");
include("./langs/" . $config["langFile"]);
/*
  -----------------------------------
  ---- SCRIPT D'AUTHENTIFICATION ----
  McAdmin V3.0
  Contact : aurelien.michel@ceff.ch
  -----------------------------------
 */

session_start(); // On relaye la session
if (@session_is_registered("authentification")) { // v�rification sur la session authentification (la session est elle enregistr�e ?)
// ici les �ventuelles actions en cas de r�ussite de la connexion
} else {
    header("Location:index.php?erreur=intru"); // redirection en cas d'echec
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><?php echo $site; ?> | <?php echo $admin; ?> | Gestion des logs</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="Content-Style-Type" content="text/css" />
        <meta http-equiv="content-language" content="fr,en" />
        <script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>
        <script type="text/javascript" src="../js/jquery-ui-1.8.13.custom.min.js"></script>
        <script type="text/javascript" src="../js/jquery.ui.timepicker.js"></script>
        <script type="text/javascript" src="../js/scripts.js"></script>
        <script type="text/javascript" src="../js/jquery.uniform.js"></script>
        <script type="text/javascript" src="http://cdn.jquerytools.org/1.2.5/tiny/jquery.tools.min.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/datalog.css" />
        <link rel="stylesheet" type="text/css" href="../css/custom-theme/jquery-ui-1.8.13.custom.css" />
        <link rel='shortcut icon' type="image/x-icon" href='../images/favicon.ico' />
        <link rel="stylesheet" type="text/css" href="../css/style.css" title="" media="all" />
    </head>
    <body>
        <?php
// si l'utilisateur est connect� comme admin ...
        if ($_SESSION['privilege'] == "admin") { // Affichage conditionnel : si et seulement si l'utilisateur est connect� avec le privilege administrateur
            ?>
            <div id="block">
                <div id="contentblock">
                    <div class="wrapper">
                        <?php
                        show_header_adm();
                        show_menu_adm();
                        ?>
                        <div class="mainbox">
                            <h2>Gestion des membres</h2>
                            <br />
                            <center>
                                <div class="filterContainer">
                                    <div class="innerFilter">
                                        <div class="filter">
                                            <form id="searchForm" action="">
                                                <div class="actions">
                                                    <div>
                                                        <div><input type="checkbox" name="action" value="0" /> <?php echo $lang["actions"][0]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="1" /> <?php echo $lang["actions"][1]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="2" /> <?php echo $lang["actions"][2]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="3" /> <?php echo $lang["actions"][3]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="4" /> <?php echo $lang["actions"][4]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="5" /> <?php echo $lang["actions"][5]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="6" /> <?php echo $lang["actions"][6]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="7" /> <?php echo $lang["actions"][7]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="8" /> <?php echo $lang["actions"][8]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="9" /> <?php echo $lang["actions"][9]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="10" /> <?php echo $lang["actions"][10]; ?></div><br />
                                                    </div>
                                                    <div>
                                                        <div><input type="checkbox" name="action" value="11" /> <?php echo $lang["actions"][11]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="12" /> <?php echo $lang["actions"][12]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="13" /> <?php echo $lang["actions"][13]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="14" /> <?php echo $lang["actions"][14]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="15" /> <?php echo $lang["actions"][15]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="16" /> <?php echo $lang["actions"][16]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="17" /> <?php echo $lang["actions"][17]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="18" /> <?php echo $lang["actions"][18]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="19" /> <?php echo $lang["actions"][19]; ?></div><br />
                                                        <div><input type="checkbox" name="action" value="20" /> <?php echo $lang["actions"][20]; ?></div>
                                                    </div>
                                                </div>
                                                <div class="parameters1">
                                                    <input type="password" name="password" /> <?php echo $lang["filter"]["password"]; ?><br />
                                                    <input type="text" name="players" /> <?php echo $lang["filter"]["players"]; ?><br />
                                                    <input type="text" style="width: 60px" name="x" /><input type="text" style="width: 60px" name="y" /><input type="text" style="width: 60px" name="z"/> <?php echo $lang["filter"]["xyz"]; ?><br />
                                                    <input type="text" name="range" /> <?php echo $lang["filter"]["range"]; ?><br />
                                                    <input type="text" name="keywords" /> <?php echo $lang["filter"]["keys"]; ?><br />
                                                </div>
                                                <div class="parameters2">
                                                    <input type="text" name="worlds" /> <?php echo $lang["filter"]["worlds"]; ?><br />
                                                    <span><input style="width: 95px" type="text" id="dateFrom" /><input style="width: 55px" type="text" id="timeFrom" /> <?php echo $lang["filter"]["dFrom"]; ?></span><br />
                                                    <span><input style="width: 95px" type="text" id="dateTo" /><input style="width: 55px" type="text" id="timeTo" /> <?php echo $lang["filter"]["dTo"]; ?></span><br />
                                                    <span>
                                                        <select id="item" name="item">
                                                            <option value="0"> </option>
                                                        </select> <?php echo $lang["filter"]["block"]; ?>
                                                    </span><br /><br /><br /><br /><br />
                                                    <div>
                                                        <div><button class="searchButton"><?php echo $lang["filter"]["search"]; ?></button></div>
                                                        <div class="orderRadio"><input type="checkbox" checked="checked" name="reverse" /> <?php echo $lang["filter"]["reverse"]; ?></div>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>

                                <div class="resultsContainer">
                                    <div class="innerResults">
                                        <div class="results">
                                            <div class="ui-widget">
                                                <div class="ui-state-highlight ui-corner-all searchError"> 
                                                    <p><span class="ui-icon ui-icon-alert"></span>
                                                        <?php echo $lang["messages"]["clickTo"]; ?></p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </center>
                            <br />
                        </div>
                        <?php show_footer_adm(); ?>
                    </div>
                </div>
            </div>
        <?php } ?> <!-- fin de l'affichage conditionnel -->
        <?php
// si l'utilisateur est connect� comme simple utilisateur ...
        if ($_SESSION['privilege'] == "user") { // Affichage conditionnel : si et seulement si l'utilisateur est connect&eacute; avec le privilege utilisateur simple
            header("Location:index.php?erreur=refused"); // redirection si c'est un utilisateur
        }
        ?>
    </body>
</html>
